import { useCartStore } from '@/store/cart.js'; 



/**
 * 清除缓存（已选商品数据）
 * @param 
 */
export function clearStoreGoodsNum() {  
	if (uni.getStorageSync('cartList')) {
		const storeCart = useCartStore();  // 购物车store 
		let cartList = uni.getStorageSync('cartList')
		cartList.forEach((item, index) => {
			if (item.packageOthList) {
				item.packageOthList = []
			}
			if (item.specsOthList) {
				item.specsOthList = []
			}
			item.qty = 0
		}) 
		storeCart.SetCartList(cartList) 
	} 
};